#!/usr/bin/python
# -*- coding: UTF-8 -*-

import tkinter as tk

# 创建窗体
window = tk.Tk()
window.title('Tk Demo')
window.geometry('350x500')

var1 = tk.StringVar()
l = tk.Label(
    window,
    bg='yellow',
    width=20
)
l.pack()


def print_selection(v):
    l.config(text='you have select ' + v)


s = tk.Scale(
    window,
    label='try me',
    from_=5,
    to=10,
    orient=tk.HORIZONTAL,
    length=200,
    showvalue=0,
    tickinterval=1,
    resolution=0.01,
    command=print_selection
)
s.pack()

window.mainloop()

